class Solution:
    def singleNumber(self, nums):
        hashMap={}
        n=len(nums)
        for i in nums:
          if i not in hashMap:
            hashMap[i]=1
          else:
            hashMap[i]+=1
            
        for key,value in hashMap.items():
            if value==1:
                return key


# Solution().singleNumber([2,2,1])